package ge.telasi.tasks.model.copy;

import ge.telasi.tasks.model.CopyService;
import ge.telasi.tasks.model.TaskAttachment;

/**
 * @author dimitri
 */
public class BinaryDataCopy extends CopyService<TaskAttachment> {
    
    @Override
    public TaskAttachment createClone(TaskAttachment proto) {
        TaskAttachment data = new TaskAttachment();
        copyModifiable(proto, data);
        data.setId(proto.getId());
        data.setBinaryId(proto.getBinaryId());
        data.setLength(proto.getLength());
        data.setName(copyString(proto.getName()));
        data.setOwner(proto.getOwner());
        data.setTask(proto.getTask());
        return data;
    }

}
